ECHO OFF
CLS
ECHO ÿ
ECHO This batch file will expand the TDRAW320.EXE file for the setup utility,
ECHO documentation and demo files associated with the registered version of
ECHO TheDraw.  It should only be run with this diskette in drive A.
ECHO ÿ
IF "%1"=="floppy" GOTO FLOPPY
IF "%1"=="Floppy" GOTO FLOPPY
IF "%1"=="FLOPPY" GOTO FLOPPY
IF "%1"=="hd" GOTO HD
IF "%1"=="Hd" GOTO HD
IF "%1"=="hD" GOTO HD
IF "%1"=="HD" GOTO HD

:HELP
ECHO Please indicate if to expand these files to disk drive or hard disk.
ECHO If you only have floppy disk drives, use:
ECHO ÿ
ECHO            INSTALL FLOPPY [enter]
ECHO ÿ
ECHO ÿ
ECHO Hard disk users use:
ECHO ÿ
ECHO            INSTALL HD [enter]
ECHO ÿ
ECHO ÿ
ECHO Additional instructions are displayed depending on which mode you select.
ECHO Please use either all CAPS or all lower case in your command.
ECHO ÿ
GOTO END

:FLOPPY
ECHO Floppy diskette installation:
ECHO ÿ
ECHO For this, you will need a blank formatted diskette.  If you do not
ECHO have a formatted diskette ready, please press CTRL-C at the prompt and
ECHO prepare one.
ECHO ÿ
ECHO Otherwise, insert the diskette into drive B and press any key.
ECHO ÿ
ECHO Single drive users, leave the TheDraw diskette in drive A until prompted
ECHO to swap diskettes as required.
ECHO ÿ
PAUSE
CLS
ECHO Expanding Setup Utility, Documentation and Demo files...
TDRAW320 B:\ SETUP.EXE THEDRAW.DOC DEMO.TD SHUTTLE2.ANS PRINTDOC.EXE READ.ME WHATSNEW.DOC >NUL
TDRAW320 B:\ UNCRUNCH.PAS UNCRUNCH.ASM UNCRUNCH.H UNCRUN_N.OBJ UNCRUN_F.OBJ >NUL

ECHO Done!
GOTO END

:HD
ECHO Hard Drive Installation:
ECHO ÿ
ECHO For this, you will need about 450k of free space on your hard drive.
ECHO If you do not have this amount of available space, please press CTRL-C
ECHO at the prompt and prepare some space.
ECHO ÿ
ECHO Otherwise, press any key to create the subdirectory C:\THEDRAW, expand
ECHO the setup utility, documentation, support files, and copy the registered
ECHO program version over.
ECHO ÿ
PAUSE
CLS
ECHO ÿ
IF EXIST C:\THEDRAW\*.* GOTO DIREXIST >NUL

ECHO Creating sub-directory \THEDRAW on Hard Drive C.
ECHO ÿ
MD C:\THEDRAW >NUL
COPY A:\INSTALL.BAT C:\THEDRAW\TEMP$$$.$$$ >NUL
IF NOT EXIST C:\THEDRAW\TEMP$$$.$$$ GOTO HDERROR >NUL
GOTO HDPROCEED

:DIREXIST
ECHO Sub-directory \THEDRAW already exists on Hard Drive C.
ECHO
:HDPROCEED
CD C:\THEDRAW >NUL
DEL C:TEMP$$$.$$$ >NUL

ECHO Expanding documentation and demo files...
TDRAW320 C:\THEDRAW\ SETUP.EXE THEDRAW.DOC DEMO.TD SHUTTLE2.ANS PRINTDOC.EXE READ.ME WHATSNEW.DOC >NUL
TDRAW320 C:\THEDRAW\ UNCRUNCH.PAS UNCRUNCH.ASM UNCRUNCH.H UNCRUN_N.OBJ UNCRUN_F.OBJ >NUL

ECHO Copying THEDRAWR program files...
COPY THEDRAWR.EXE C: >NUL
COPY THEDRAWR.HLP C: >NUL
COPY THEPP.EXE C: >NUL
C:

:ALLDONE
ECHO Done!
ECHO ÿ
ECHO Use the program PRINTDOC.EXE to print out the documentation for TheDraw.
ECHO Also see READ.ME file for important last minute information.  Enjoy!
ECHO ÿ
GOTO END

:HDERROR
ECHO ÿ
ECHO Sorry, unable to create the subdirectory \THEDRAW on drive C.
ECHO ÿ

:END